mkdir -p redis1/conf redis1/data
mkdir -p redis2/conf redis2/data
mkdir -p redis3/conf redis3/data
mkdir -p redis4/conf redis4/data
mkdir -p redis5/conf redis5/data
mkdir -p redis6/conf redis6/data

echo "port 7000
cluster-enabled yes
cluster-config-file /data/nodes.conf
cluster-node-timeout 5000
appendonly yes" > redis1/conf/redis.conf

echo "port 7001
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes" > redis2/conf/redis.conf

echo "port 7002
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes" > redis3/conf/redis.conf

echo "port 7003
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes" > redis4/conf/redis.conf

echo "port 7004
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes" > redis5/conf/redis.conf

echo "port 7005
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes" > redis6/conf/redis.conf
